package com.func.springsecuritydemo.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.func.springsecuritydemo.pojo.RespObj;

@Controller
public class HelloController {
	
	@Secured("ROLE_ADMIN")
	@ResponseBody
	@GetMapping("/hello")
	public RespObj sayHello(){
		return RespObj.success("你好啊");
	}

}
